package com.imooc.newretail.bpl.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.imooc.newretail.bpl.entity.Role;
import com.baomidou.mybatisplus.extension.service.IService;
import com.imooc.newretail.bpl.entity.RolePermission;

import java.util.List;

/**
 * <p>
 * 系统角色表 服务类
 * </p>
 *
 * @author Hank
 * @since 2020-06-27
 */
public interface IRoleService extends IService<Role> {

    boolean removeRoleAndPermission(String roleId);

    /**
     * 根据角色ID查询角色的权限列表(带分页)
     * @param roleId
     * @param page
     * @return
     */
    IPage<RolePermission>  findPermissonByRoleId(String roleId, Page page);

     boolean savePermissons(List<RolePermission> permissionList);
}
